﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Environment;
using Pixysoft.Weblications.Sango.Formular;
using Pixysoft.Weblications.Sango.Protocol.section;
using Pixysoft.Weblications.Sango.Protocol;
using System.Data;
using Pixysoft.Weblications.Sango.Battle;

namespace Pixysoft.Weblications.Sango.Command.section_rvr
{
    partial class SangoSectionRvrHandler
    {
        public sectionrvr_fightjoin sectionrvr_fightjoin(long roomcode)
        {
            string usercode = SangoManager.Authentication();

            sectionrvr_fightjoin response = ReflectionManager.CreatePojo<sectionrvr_fightjoin>();
            response.Succeed = false;

            RvrSectionTeam team = RvrSectionController.Instance.JoinSectionTeam(roomcode, usercode);
            response.rvr = team.Battledate;
            response.rvrcode = team.TargetSection.Sectionserialcode;
            response.profiles = UsrSectionFacade.ToProfilesBySectionTeam(team);
            response.Succeed = true;
            return response;
        }

    }
    public interface sectionrvr_fightjoin : ISangoResponse
    {
        long rvr { get;set;}
        long rvrcode { get;set;}
        List<section_profile> profiles { get;set;}
    }
}
